/**
 */
package fUML.Semantics.Activities.CompleteStructuredActivities;

import fUML.Syntax.Activities.IntermediateActivities.ActivityNode;

import org.eclipse.emf.common.util.EList;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Loop Node Activation</b></em>'.
 * <!-- end-user-doc -->
 *
 * <!-- begin-model-doc -->
 * A loop node activation is a structured activity node activation for a node that
 *                 is a loop node.
 * <!-- end-model-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link fUML.Semantics.Activities.CompleteStructuredActivities.LoopNodeActivation#getBodyOutputLists <em>Body Output Lists</em>}</li>
 * </ul>
 * </p>
 *
 * @see fUML.Semantics.Activities.CompleteStructuredActivities.CompleteStructuredActivitiesPackage#getLoopNodeActivation()
 * @model
 * @generated
 */
public interface LoopNodeActivation extends StructuredActivityNodeActivation {
	/**
	 * Returns the value of the '<em><b>Body Output Lists</b></em>' containment reference list.
	 * The list contents are of type {@link fUML.Semantics.Activities.CompleteStructuredActivities.Values}.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Body Output Lists</em>' containment reference list isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Body Output Lists</em>' containment reference list.
	 * @see fUML.Semantics.Activities.CompleteStructuredActivities.CompleteStructuredActivitiesPackage#getLoopNodeActivation_BodyOutputLists()
	 * @model containment="true" ordered="false"
	 * @generated
	 */
	EList<Values> getBodyOutputLists();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Run the test part of the loop node for this node activation.
	 *  //
	 *                   Return the value on the decider pin.
	 *  
	 *  Debug.println("[runTest]
	 *                   Running test...");
	 *  
	 *  LoopNode loopNode =
	 *                   (LoopNode)(this.node);
	 *  
	 *                   this.activationGroup.runNodes(this.makeActivityNodeList(loopNode.test));
	 *                   
	 *  ValueList values = this.getPinValues(loopNode.decider);
	 *                   
	 *  // If there is no decider value, treat it as false.
	 *  boolean
	 *                   decision = false;
	 *  if (values.size() > 0) { 
	 *  decision =
	 *                   ((BooleanValue)(values.getValue(0))).value;
	 *  }
	 *  
	 *                   Debug.println("[runTest] " + (decision? "Test succeeded.": "Test
	 *                   failed."));
	 *  
	 *  return decision;
	 *  
	 * <!-- end-model-doc -->
	 * @model required="true" ordered="false"
	 * @generated
	 */
	boolean runTest();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Run the body part of the loop node for this node activation and save the
	 *                   body outputs.
	 *  
	 *  Debug.println("[runBody] Running
	 *                   body...");
	 *  
	 *  LoopNode loopNode = (LoopNode)this.node;
	 *                   
	 *                   this.activationGroup.runNodes(this.makeActivityNodeList(loopNode.bodyPart));
	 *                   
	 *  OutputPinList bodyOutputs = loopNode.bodyOutput;
	 *  ValuesList
	 *                   bodyOutputLists = this.bodyOutputLists;
	 *  for (int i = 0; i <
	 *                   bodyOutputs.size(); i++) {
	 *  OutputPin bodyOutput =
	 *                   bodyOutputs.getValue(i);
	 *  Values bodyOutputList =
	 *                   bodyOutputLists.getValue(i);
	 *  bodyOutputList.values =
	 *                   this.getPinValues(bodyOutput);
	 *  }
	 *  
	 * <!-- end-model-doc -->
	 * @model
	 * @generated
	 */
	void runBody();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Run the loop variable pins of the loop node for this node
	 *                   activation.
	 *  
	 *                   this.activationGroup.runNodes(this.makeLoopVariableList());
	 *  
	 * <!-- end-model-doc -->
	 * @model
	 * @generated
	 */
	void runLoopVariables();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Return an activity node list containing the loop variable pins for the loop
	 *                   node of this activation.
	 *  
	 *  LoopNode loopNode =
	 *                   (LoopNode)(this.node);
	 *  ActivityNodeList nodes = new
	 *                   ActivityNodeList();
	 *  
	 *  OutputPinList loopVariables =
	 *                   loopNode.loopVariable;
	 *  for (int i = 0; i < loopVariables.size();
	 *                   i++) {
	 *  OutputPin loopVariable = loopVariables.getValue(i);
	 *                   nodes.addValue(loopVariable);
	 *  }
	 *  
	 *  return nodes;
	 *                   
	 *  
	 * <!-- end-model-doc -->
	 * @model ordered="false"
	 * @generated
	 */
	EList<ActivityNode> makeLoopVariableList();

} // LoopNodeActivation
